.carousel-container {
    position: relative;
    width: 100%;
    max-height: 65vh; /* Asegura que tampoco se dispare en alto */
    margin: 0 auto;
    margin-top: 2rem;
    margin-bottom: 2rem;
    overflow: hidden;
    background-color: #ffffff; /* Fondo para evitar espacios blancos si difieren levemente las proporciones */
    border-radius: 4px;
    display: flex;
    flex-direction: column;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
    flex: 1;
    min-height: 0;
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0;
}

.carousel-slide img {
    width: auto;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain; /* Mantiene la proporción original sin recortar ni deformar */
}

/* --- Controles y Footer comunes --- */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    color: rgba(0, 0, 0, 0.3);
    border: none;
    font-size: 2rem;
    padding: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover { color: rgba(0, 0, 0, 0.8); }
.carousel-btn.prev { left: 20rem; }
.carousel-btn.next { right: 20rem; }

.carousel-footer {
    width: 100%;
    color: rgba(0, 0, 0, 0.7);
    text-align: center;
    padding: 10px 0;
    z-index: 10;
    flex-shrink: 0;
}

.carousel-title {
    margin-bottom: 8px;
    font-size: 14px;
    font-family: sans-serif;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.dot {
  display: block;
    width: 10px;
    height: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active { background-color: rgba(0, 0, 0, 0.7); }


/* =========================================
   RESPONSIVE: CARRUSEL VERTICAL SIN FLECHAS SUPERPUESTAS
   ========================================= */

@media (max-width: 1200px) {
    .carousel-container {
        max-height: 62vh;
    }

    .carousel-slide {
        padding: 0 7rem;
        box-sizing: border-box;
    }

    .carousel-btn.prev {
        left: 2rem;
    }

    .carousel-btn.next {
        right: 2rem;
    }
}

@media (max-width: 992px) {
    .carousel-container {
        max-height: 58vh;
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .carousel-slide {
        padding: 0 5rem;
        box-sizing: border-box;
    }

    .carousel-btn.prev {
        left: 1.25rem;
    }

    .carousel-btn.next {
        right: 1.25rem;
    }
}

@media (max-width: 768px) {
    .carousel-container {
        height: 65vh;
        min-height: 380px;
        max-height: 620px;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .carousel-slide {
        padding: 0 3.75rem;
        box-sizing: border-box;
    }

    .carousel-slide img {
        width: auto;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    .carousel-btn {
        width: 2.5rem;
        height: 2.5rem;
        padding: 0;
        font-size: 1.4rem;
        background-color: transparent;
        border-radius: 50%;
    }

    .carousel-btn.prev {
        left: 0.6rem;
    }

    .carousel-btn.next {
        right: 0.6rem;
    }

    .carousel-title {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .carousel-dots {
        flex-wrap: wrap;
        max-width: 92vw;
        margin: 0 auto;
        padding: 0 0.75rem;
        gap: 6px;
    }

    .dot {
        width: 8px;
        height: 8px;
        flex: 0 0 auto;
    }
}